package com.jeasonzhao.web;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

public abstract class AbstractEnvelopTag extends BasicTagSupport
{
    private static final long serialVersionUID = 1L;

    public AbstractEnvelopTag()
    {
        super();
    }

    protected abstract void beforeBody();

    protected abstract void afterBody();

    public int doStartTag()
        throws JspException
    {
        beforeBody();
        return TagSupport.EVAL_BODY_INCLUDE;
    }

    public int doEndTag()
        throws JspException
    {
        afterBody();
        return TagSupport.EVAL_PAGE;
    }

}
